<template>
  <!-- 筛选组件 -->
  <div class="timeLine" v-loading="!(progressData && progressData.length)">
    <div class="timeItem" v-for="(item, index) in progressData" :key="index">
      <div class="timeIcon">
        <div class="icon1">
          <img v-if="item.wait == 0" src="@/assets/image/timeIcon1.png" />
          <div class="timeIcon0" v-if="item.wait == 1"></div>
          <img v-if="item.wait == 2" src="@/assets/image/timeIcon3.png" />
          <img v-if="item.wait == 3" src="@/assets/image/timeIcon2.png" />
        </div>
        <div class="iconLine" :class="{ iconIsPass: item.wait == 2, iconIsError: item.wait == 3 }" v-if="progressData.length != index + 1"></div>
      </div>
      <div class="timeText">
        <div class="txt1">{{ item.title }}</div>
        <div class="txt2">{{ item.username }}</div>
        <div class="txt2">{{ item.createTime }}</div>
        <div class="txt2" :class="{ color1: item.wait == 0, color2: item.wait == 3, colo3: item.wait == 1, color5: item.wait == 2 }">
          {{ item.waitStr }}
        </div>
        <!-- <div class="txt2 color1">{{ item.waitStr }}</div>
        <div class="txt2 color2">{{ item.waitStr }}</div>
        <div class="txt2 color3">{{ item.waitStr }}</div>
        <div class="txt2 color4">{{ item.waitStr }}</div>
        <div class="txt2 color5">{{ item.waitStr }}</div> -->
      </div>
      <!-- <div class="timeText">
        <div class="txt1">{{ item.title }}</div>
        <div class="txt2" v-if="item.wait == 2">{{ item.username }}</div>
        <div class="txt2" v-if="item.wait == 2">{{ item.createTime }}</div>
        <div
          class="txt2"
          v-else
          :class="{ color1: item.wait == 0, color2: item.wait == 3 }"
        >
          {{ item.title == "等待重新提交" ? "等待重新提交" : typeArr[item.wait] }}
        </div>
      </div> -->
    </div>
  </div>
</template>
<script>
//引入vue方法
export default {
  props: ['progressData'],
  data() {
    return {
      typeArr: ['等待审核', ' ', '已通过审核', '当前阶段已被驳回'],
    }
  },
  methods: {},
}
</script>

<style lang="scss" scoped>
.timeLine {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  .timeItem {
    display: flex;
    .timeIcon {
      margin-right: 12px;
      margin-bottom: 4px;
      .icon1 {
        width: 14px;
        height: 14px;
        .timeIcon0 {
          width: 14px;
          height: 14px;
          background-color: $color999999;
          border-radius: 50%;
        }
        img {
          width: 14px;
          height: 14px;
          border-radius: 50%;
        }
      }
      .iconLine {
        width: 2px;
        height: 50px;
        background-color: #999;

        transform: translate(6px, 2px);
      }
      .iconIsPass {
        background-color: #2c83e4;
      }
      .iconIsError {
        background-color: #f05e5e;
      }
    }
    .timeText {
      color: $color999999;
      font-size: 12px;
      transform: translateY(-1px);
      .txt1 {
        color: $color35353F;
        margin-bottom: 4px;
      }
    }
  }
}
</style>